package com.woniu.controller;

/*
 *
 * @author   米雷
 * @Description
 * @Date:create in 22:57 2020-03-26
 *
 * */

import com.woniu.dto.HomeDetail;
import com.woniu.dto.ProPloHome;
import com.woniu.service.PlotService;
import com.woniu.userLog.LogPoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Api(tags = "物业信息")
@Controller
@RequestMapping("/plot")
@CrossOrigin(allowCredentials = "true", maxAge = 3600)
public class PlotsControlelr {


    @Autowired
    PlotService plotService;

    /*
     * @auth  米雷
     *
     * 根据小区id查询小区及物业信息
     * */
    @ApiOperation(value = "查看我的物业")
    @GetMapping("/get")
    @ResponseBody
    @LogPoint("用户查看物业信息")
    public ProPloHome getPlotProperty(Integer id)
    {
        ProPloHome plots = plotService.getPlotProperty(id);
        return plots;
    }


}
